import { applyMiddleware,createStore } from "redux"
import { composeWithDevTools } from "redux-devtools-extension"
import rootReducer from "../reducers/index"

//yarn add redux-thunk
import thunk from "redux-thunk"
//yarn add redux-logger

//调式工具
//中间件引入是有先后的 logger是最后 thunk要在前面   applyMiddleware的时候也是 logger最后 thunk前面
let store = createStore(rootReducer,composeWithDevTools(applyMiddleware(thunk)))

export default store
